<script setup>
import {inject} from "vue"
const colorId = inject("themColor");
console.log(colorId.value)
const changeColor = inject("changeColor");

const fn = () =>{
  changeColor(1000)
}
</script>

<template>
  <div>我是底层组件 themColorId:{{colorId}}</div>
  <button @click="fn">修改</button>

</template>

<style scoped>

</style>
